/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.ipti.br.tag.entity;

import java.io.Serializable;
import java.util.Calendar;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author israel
 */
@Entity
@SequenceGenerator(name = "sync_cont_gen", sequenceName = "sync_cont_gen", initialValue = 1, allocationSize = 1)
public class SynchController implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sync_cont_gen")
    private Long id;
    @Column(name = "serial_number", unique = true)
    private Long serialNumber;
    @Column(name = "last_updated")
    @Temporal(TemporalType.TIMESTAMP)
    private Calendar lastUpdated;
    @Column(name = "last_received")
    @Temporal(TemporalType.TIMESTAMP)
    private Calendar lastReceived;

    public SynchController() {
    }

    public SynchController(Long serialNumber, Calendar lastUpdated) {
        this.serialNumber = serialNumber;
        this.lastUpdated = lastUpdated;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Calendar getLastUpdated() {
        return lastUpdated;
    }

    public void setLastUpdated(Calendar lastUpdated) {
        this.lastUpdated = lastUpdated;
    }

    public Long getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(Long serialNumber) {
        this.serialNumber = serialNumber;
    }

    public Calendar getLastReceived() {
        return lastReceived;
    }

    public void setLastReceived(Calendar lastReceived) {
        this.lastReceived = lastReceived;
    }
}
